Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry connection with the backend of access logs #1100

Merged
merged 6 commits into from
Jul 17, 2024
Merged

Conversation

Keksoj
Copy link
Member

@Keksoj Keksoj commented Apr 17, 2024

Until now, a failure in transmitting access logs (e.g. a UNIX socket not responding/existing) would mean that Sōzu would not emit access logs anymore.

This pull request:

  • adds a revive_backend function
  • makes Sōzu startup impossible if the backend of access logs does not exist (note: if no access_logs_target is given in config.toml, it will still default to stdout)

Additionally, this PR adds error types and propagation.

command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/mod.rs Outdated Show resolved Hide resolved
command/src/logging/mod.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
Keksoj and others added 5 commits July 11, 2024 16:38
startup fails when access logs backend is not responding
create const DEFAULT_LOG_TARGET with value "stdout"

Co-Authored-By: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
Signed-off-by: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
command/examples/bench_logger.rs Outdated Show resolved Hide resolved
command/examples/bench_logger.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Show resolved Hide resolved
command/src/logging/logs.rs Outdated Show resolved Hide resolved
command/src/logging/logs.rs Show resolved Hide resolved
Copy link

@llenotre llenotre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Keksoj Keksoj dismissed FlorentinDUBOIS’s stale review July 17, 2024 14:29

the PR was reviewed with @llenotre who approved of my points

@Keksoj Keksoj merged commit 97dab8d into main Jul 17, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants